{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6.25e-05\n"
     ]
    }
   ],
   "source": [
    "b = cv2.getTickCount()\n",
    "e = cv2.getTickCount()\n",
    "print((e - b) / cv2.getTickFrequency())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "z = np.uint8([10])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.000125\n"
     ]
    }
   ],
   "source": [
    "b = cv2.getTickCount()\n",
    "x * x * x\n",
    "e = cv2.getTickCount()\n",
    "print((e - b) / cv2.getTickFrequency())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.0001265\n"
     ]
    }
   ],
   "source": [
    "b = cv2.getTickCount()\n",
    "x**3\n",
    "e = cv2.getTickCount()\n",
    "print((e - b) / cv2.getTickFrequency())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.0001292\n"
     ]
    }
   ],
   "source": [
    "b = cv2.getTickCount()\n",
    "z * z * z\n",
    "e = cv2.getTickCount()\n",
    "print((e - b) / cv2.getTickFrequency())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "c8021be2121acb6aedb321c9fc0970845e72ecff144800146fabd90eee2b1d5e"
  },
  "kernelspec": {
   "display_name": "Python 3.8.12 64-bit ('learn': conda)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.12"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
